home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / PDraw3.0.adf / pdraw_rex.lzh / SplitFileName.rexx < prev    next >
OS/2 REXX Batch file  |  1992-06-15  |  244b  |  14 lines

  1. /*
  2.     SplitFileName.rexx
  3.     This macro will separate the filename from a pathname
  4. */
  5.  
  6. parse arg pathname
  7.  
  8. colon = lastpos('/', pathname)
  9. if colon = 0 then colon = pos(':', pathname)
  10.  
  11.  
  12. if colon = 0 then return("")
  13. else return(left(pathname, colon))
  14.